import Vue from 'vue'
import Router from 'vue-router'
import Fund from '../pages/Fund/fund.vue'
import Home from '../pages/Home/home.vue'
import Ideas from '../pages/Ideas/idea.vue'
import Mine from '../pages/Mine/mine.vue'
import Project from '../pages/Project/project.vue'
import Setting from '../pages/Mine/setting.vue'
import Login from '../pages/Mine/login.vue'
import Index from '../pages/Project/index.vue'
import GFund from '../pages/Project/guideFund.vue'
import Seter from '../pages/Mine/set/set.vue'
import Safe from '../pages/Mine/set/safe.vue'
import IdeaGuide from '../pages/Other/other/guideCreate.vue'
import Other from '../pages/Other/index.vue'
import Service from '../pages/Other/other/service.vue'
//const Fund = () =>('../pages/Fund/fund.vue')
//const Home = () =>('../pages/Home/home.vue')
//const Ideas = () =>('../pages/Ideas/idea.vue')
//const Mine = () =>('../pages/Mine/mine.vue')
//const Login = () =>('../pages/Mine/login.vue')
//const Other = () =>('../pages/Other/service.vue')
//const Project= () =>('../pages/Project/project.vue')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home',
      meta:{showFooter:1}
    },
    {
      path: '/fund',
      component: Fund, // 返回路由组件的函数, 只有执行此函数才会加载路由组件, 这个函数在请求对应的路由路径时才会执行
      meta:{showFooter:1}
    },
    {
      path: '/home',
      component: Home, 
      meta:{showFooter:1}
    },
    {
      path: '/idea',
      component: Ideas, 
      meta:{showFooter:1},
      
    },
    {
      path: '/mine',
      component: Mine, 
      meta:{showFooter:1}
    },
    {
      path: '/login',
      component: Login, 
      meta:{showFooter:0}
    },
    {
      path: '/other',
      component: Other, 
      meta:{showFooter:0},
      children:[
        {
          path:'/other/guide',
          component:IdeaGuide,
        },
        {
          path:'/other/service',
          component:Service,
        }
      ]
    },
    {
      path: '/project',
      component: Project, 
      meta:{showFooter:1}
    },
    {
      path:'/setting',
      component:Setting,
      meta:{showFooter:0}
    },
    {
      path:'/objindex',
      component:Index,
      meta:{showFooter:0}
    },
    {
      path:'/guide-fund',
      component:GFund,
      meta:{showFooter:0}
    },
    {
      path: '/set',
      component:Seter, 
      meta:{showFooter:0}
    },
    {
      path: '/safe',
      component:Safe, 
      meta:{showFooter:0}
    },
  ]
})
